#!/bin/bash
SCRIPTNAME=check_size
scriptPath=${0%$SCRIPTNAME}
if [ -z "$scriptPath" ]
then
  #invoked from PATH
  scriptPath=$(which $0)
  scriptPath=${scriptPath%$SCRIPTNAME}
fi
source ${scriptPath}vbs_common_functions
RECORDING=$1

SUM=0

for i in ${ROOTDIRS}*
do
  if [ -d $i/$RECORDING ]
  then
    for j in $i/$RECORDING/*
    do
      SUM=$(($SUM+`stat $j -c %s`))
    done
  fi
done

echo $SUM B, $(($SUM/(1024)))KB $(($SUM/(1024*1024)))MB, $((SUM/(1024*1024*1024)))GB
